<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a="http://topnet.it/facelets"
	xmlns:fn="http://topnet.it/functions"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">

THIS TEXT WILL BE REMOVED
<ui:composition>


	<c:if test="${empty label}">
		<c:set var="label" value="${fieldName}Label" />
	</c:if>
	<c:if test="${empty rendered}">
		<c:set var="rendered" value="true" />
	</c:if>
	<c:if test="${empty type}">
		<c:set var="type" value="outputText" />
	</c:if>
	<c:if test="${empty id}">
		<c:set var="id" value="#{fieldName}id" />
	</c:if>
	<c:choose>
		<c:when test='${rendered == "true"}'>
			<c:choose>
				<c:when test='${type == "outputText"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputText id="${id}" value="#{entity[fieldName]}" />
				</c:when>
				<c:when test='${type == "outputDate"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputText id="${id}" value="${entity[fieldName]}">
						<f:convertDateTime locale="IT" type="date" dateStyle="medium" />
					</h:outputText>
				</c:when>
				<c:when test='${type == "outputDateTime"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputText id="${id}" value="${entity[fieldName]}">
						<f:convertDateTime type="both" pattern="dd/M/yy HH:mm" />
					</h:outputText>
				</c:when>
				<c:when test='${type == "link"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputLink id="${id}" value="${val}">
						<h:outputText value="${label}" />
					</h:outputLink>
				</c:when>
				<c:when test='${type == "getCodice"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputText id="${id}" value="#{fn:getCodice(entity[fieldName])}" />
				</c:when>
				<c:when test='${type == "getArrayValue"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputText id="${id}" value="#{fn:getArrayValue(campo,entity)}" />
				</c:when>
				<c:when test='${type == "getEntityTypeVisual"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputText id="${id}"
						value="#{fn:getEntityTypeVisual(fieldName)}" />
				</c:when>
				<c:when test='${type == "getContactType"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputText id="${id}" value="#{fn:getContactType(fieldName)}" />
				</c:when>
				<c:when test='${type == "htmlText"}'>
					<div id="#{id}">
						<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
						<h:outputText value="#{fn:nl2br(entity[fieldName])}"
							escape="false" />
					</div>
				</c:when>
				<c:when test='${type == "boolean"}'>
					<h:outputLabel id="#{id}Label" value="${label}" for="${id}" />
					<h:outputText id="${id}si" value="SI"
						rendered="#{entity[fieldName] == true}" />
					<h:outputText id="${id}no" value="NO"
						rendered="#{entity[fieldName] == false}" />

				</c:when>
			</c:choose>
		</c:when>
	</c:choose>


</ui:composition>
THIS TEXT WILL BE REMOVED AS WELL

</html>
